<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试页面</title>
    <script src="js/jquery-2.2.1.min.js"></script>
</head>
<script type="text/javascript">
    //经纬度获取
    $.ajax({
        url:"https://restapi.amap.com/v3/geocode/geo",
        type:'get',
        dateType:'json',
        data:{
            address:'南京',
            key:'db1662e575cbc4ebab86cd69b903b75f'
        },
        success:function(data){
            alert("成功");
            alert(data.geocodes[0].location);
        },
        error:function (e) {
            alert("错误");
        }
    });

</script>
<body>

</body>
</html>
